﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;

namespace UtilsORM.MySqlData;

[Index("ml_device_guid", Name = "idx_device_guid")]
[Index("ml_add_time", Name = "idxaddtime")]
[Index("ml_guid", Name = "idxcguid")]
[Index("ml_gw_d_guid", Name = "idxdeviceGuid")]
[Index("ml_gw_code", Name = "idxdeviceid")]
[MySqlCharSet("utf8mb3")]
[MySqlCollation("utf8mb3_general_ci")]
public partial class iot_mq_log
{
    [Key]
    public long ml_id { get; set; }

    [StringLength(50)]
    public string ml_guid { get; set; }

    [StringLength(50)]
    public string ml_gw_code { get; set; }

    /// <summary>
    /// 设备ID
    /// </summary>
    [StringLength(50)]
    public string ml_gw_d_guid { get; set; }

    /// <summary>
    /// 内容
    /// </summary>
    public string ml_content { get; set; }

    /// <summary>
    /// 类型 send/receive
    /// </summary>
    [StringLength(30)]
    public string ml_type { get; set; }

    [StringLength(255)]
    public string ml_mqguid { get; set; }

    /// <summary>
    /// 消息事项名称
    /// </summary>
    [StringLength(255)]
    public string ml_mqevent { get; set; }

    [StringLength(300)]
    public string ml_remark { get; set; }

    /// <summary>
    /// true/false
    /// </summary>
    [StringLength(255)]
    public string ml_result { get; set; }

    [Column(TypeName = "datetime(3)")]
    public DateTime? ml_add_time { get; set; }

    [StringLength(50)]
    public string ml_device_guid { get; set; }
}
